package com.xiaoyung.easyisapisdk.feign.api.workflow;

import com.xiaoyung.easyisapisdk.common.base.IdsParam;
import com.xiaoyung.easyisapisdk.common.workflow.entity.ProcHiProcinstEntity;
import com.xiaoyung.easyisapisdk.common.workflow.request.CancleFlowParam;
import com.xiaoyung.easyisapisdk.common.workflow.request.FlowListQueryParam;
import com.xiaoyung.easyisapisdk.common.workflow.request.FlowQueryParam;

import feign.Headers;
import feign.RequestLine;

/**
 * 说明：历史流程任务
 */
/*@Api(tags={"流程实例"})
@ApiSupport(author = "Martin",order = 4)
@RestController
@RequestMapping(value = "/openapi/procInstance")*/
public interface ProcInstanceApi{

	/**
	 * 流程实例列表
	 */
	
	/*@ApiOperation(value = "流程实例列表")
	@ApiOperationSupport(order = 1, includeParameters = {})
	@ApiImplicitParams({
		@ApiImplicitParam(name = "pageNum", value = "页码", dataTypeClass = Integer.class, paramType = "query", required = false),
		@ApiImplicitParam(name = "pageSize", value = "页面大小", dataTypeClass = Integer.class, paramType = "query", required = false)
	})
	@GetMapping(value = "/list", name = "流程实例列表(包含运行中和历史流程实例)")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/procInstance/list")
	public ProcHiProcinstEntity list(FlowListQueryParam req) ;

	/*@ApiOperation(value = "根据id查询流程实例")
	@ApiOperationSupport(order = 1, includeParameters = {})
	@ApiImplicitParams({
		@ApiImplicitParam(name = "procInstId", value = "流程实例id", dataTypeClass = String.class, paramType = "query", required = false),
		@ApiImplicitParam(name = "businessKey", value = "业务key", dataTypeClass = String.class, paramType = "query", required = false),
		@ApiImplicitParam(name = "needActinst", value = "是否需要流程节点(true|false)", dataTypeClass = String.class, paramType = "query", required = false),
		@ApiImplicitParam(name = "needImg", value = "是否需要流程图片(true|false)", dataTypeClass = String.class, paramType = "query", required = false),
		@ApiImplicitParam(name = "needVarMap", value = "是否需要流程变量(true|false)", dataTypeClass = String.class, paramType = "query", required = false)
	})
	@GetMapping(value = "/findById")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/procInstance/findById")
	public ProcHiProcinstEntity findById(FlowQueryParam req);

	/**
	 * 删除 已结束历史流程
	 */
	/*@ApiOperation(value = "删除已结束流程")
	@ApiOperationSupport(order = 1, includeParameters = {})
	@PostMapping("/delete")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/procInstance/delete")
	public Void delete(IdsParam req) ;

	/**
	 * 作废 运行中的流程
	 */
	/*@ApiOperation(value = "作废运行中流程")
	@ApiOperationSupport(order = 1, includeParameters = {})
	@ApiImplicitParams({
		@ApiImplicitParam(name = "procInstId", value = "流程实例id(流程实例id和业务key二者传一个)", dataTypeClass = String.class, paramType = "query", required = false),
		@ApiImplicitParam(name = "businessKey", value = "业务key(流程实例id和业务key二者传一个)", dataTypeClass = String.class, paramType = "query", required = false),
		@ApiImplicitParam(name = "reason", value = "作废原因", dataTypeClass = String.class, paramType = "query", required = false),
		@ApiImplicitParam(name = "triggerEvent", value = "是否触发作废事件(true|false),缺省false", dataTypeClass = Boolean.class, paramType = "query", required = false),
	})
	@PostMapping("/cancle")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/procInstance/cancle")
	public Void cancle(CancleFlowParam req) ;


}
